from zope.interface import Interface
from zope import schema

from zope.app.container.constraints import contains

from apkn.resource import ResourceMessageFactory as _

class IResourceFolder(Interface):
    """A folder containing resources.
    """
    contains('apkn.resource.interfaces.IResource',)
    
    title = schema.TextLine(title=_(u"Title"),
                            required=True)
                            
    description = schema.TextLine(title=_(u"Description"),
                                  description=_(u"A short summary of this resource folder"))
                                  
    text = schema.SourceText(title=_(u"Descriptive text"),
                             description=_(u"Descriptive text about this set of resources"),
                             required=True)
    
class IResource(Interface):
    """A resource.
    """
    
    title = schema.TextLine(title=_(u"Title"),
                            required=True)
                            
    description = schema.TextLine(title=_(u"Description"),
                                  description=_(u"A short summary of this resource"))                                 
                            
    webaddress = schema.TextLine(title=_(u"Website address"),
                            description=_(u"Website address for this resource"),
                            required=True)
                            
    country = schema.TextLine(title=_(u"Country"),
                            description=_(u"Resource country"),
                            required=True)        

    region = schema.TextLine(title=_(u"Region"),
                            description=_(u"Resource region"),
                            required=True)                  

    economicbloc = schema.TextLine(title=_(u"Economic Bloc"),
                            description=_(u"Economic bloc of the region"),
                            required=True)  
                            
    resourcetype = schema.Text(title=_(u"Resource Type"),
                          description=_(u"Type of resource"),
                          required=True)
                            
    resourcesubject = schema.Text(title=_(u"Resource Subject"),
                          description=_(u"Resource category"),
                          required=True)                                                                        
                            
